import { rawRequestClient } from '#/api/request';

// 获取用户列表
export function getUserList(params: any) {
  return rawRequestClient.get(`${import.meta.env.VITE_AUTH_SERVER}/users`, { params });
}

// 创建用户
export function createUser(data: any) {
  return rawRequestClient.post(`${import.meta.env.VITE_AUTH_SERVER}/users`, data);
}

// 获取用户详情
export function getUserDetail(id: string) {
  return rawRequestClient.get(`${import.meta.env.VITE_AUTH_SERVER}/users/${id}`);
}

// 更新用户
export function updateUser(id: string, data: any) {
  return rawRequestClient.put(`${import.meta.env.VITE_AUTH_SERVER}/users/${id}`, data);
}

// 删除用户
export function deleteUser(id: string) {
  return rawRequestClient.delete(`${import.meta.env.VITE_AUTH_SERVER}/users/${id}`);
}
